package com.example.stock.task;

import com.example.stock.excel.finance.FinanceDataUtils;
import lombok.extern.log4j.Log4j2;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

@Log4j2
@Component
public class FinanceDataTask {

    @Async
    public void genIncTotalRevenueYearOnYearData() {
        FinanceDataUtils.getIncTotalRevenueYearOnYearList();
        log.info("营业总收入同比增长率初始化完毕");
    }

    @Async
    public void genTotalOperatingRevenueData() {
        FinanceDataUtils.getTotalOperatingRevenueList();
        log.info("总营业收入数据初始化完毕");
    }

    @Async
    public void genRoeData() {
        FinanceDataUtils.getRoeList();
        log.info("roe数据初始化完毕");
    }

    @Async
    public void genAdjustedProfitData() {
        FinanceDataUtils.getAdjustedProfitList();
        log.info("扣非利润数据初始化完毕");
    }

    @Async
    public void genGrossProfitMarginData() {
        FinanceDataUtils.getGrossProfitMarginList();
        log.info("毛利率数据初始化完毕");
    }

    @Async
    public void genNetProfitMarginData() {
        FinanceDataUtils.getNetProfitMarginList();
        log.info("净利润率数据初始化完毕");
    }

    @Async
    public void genLiabilityOnAssetRatioData() {
        FinanceDataUtils.getLiabilityOnAssetRatioList();
        log.info("资产负债率数据初始化完毕");
    }
}
